import type { ComponentPublicInstance, ExtractPropTypes, PropType } from "vue";

export const battlesProps = {
  params: {
    type: Object as PropType<API.Battles.BattleListParams>,
    default: () => ({}),
  },
  showSize: {
    type: Number,
    default: 3,
  },
  diffRequestSeconds: {
    type: Number,
    default: 1,
  },
  request: {
    type: Function,
    default: null,
  },
};

export type BattlesProps = ExtractPropTypes<typeof battlesProps>;

export type BattlesExpose = {
  resetQuery: () => void;
};

export type BattlesInstance = ComponentPublicInstance<
  BattlesExpose,
  BattlesProps
>;
